1. Field of the Invention
The present invention relates to a H.264 decoding method for fast context adaptive variable length coding (CAVLC), and more particularly, to a method of finding multiple tables effectively and fast to obtain coefficients for CAVLC blocks within the shortest period of time such that a decoder with excellent efficiency can be designed for low frequency.
2. Background of the Related Art
In the age of ultra-high-speed internet, a VOD system employing a general subscriber telephone line and an internet protocol (IP) network is used. In the case of HDTV, test service is being carried out at a rate of 4 to 6 Mbps. Considering transmission capacity of HDTV broadcasting of 19.3 Mbps, limitations on communication networks disappear as VDSL of 26 Mbps is propagated.
Recently, digital multimedia broadcasting (DMB) in which broadcasting and communication are not distinctly discriminated from each other has come into the spotlight. The DMB becomes a medium capable of providing high-speed wide-band multimedia information services the most fast and cheaply.
H.264 coding method is largely classified into context adaptive variable length coding (CAVLC) and context-based adaptive binary arithmetic codes (CABAC). At present, H.264 Baseline and X profile use the CAVLC and main profile uses both the CAVLC and CABAC.
The CAVLC can obtain coefficients through four steps. The first step obtains trailing ones T1s and total coefficient to estimate the form of a 4×4 block, and the second step obtains a level value. The third step obtains the value of total zero, and the fourth step obtains Run_before to obtain substantial coefficients.
FIG. 1 represents a table with respect to Num-VLCO of conventional H.264. The first step of CAVLC requires a lot of calculations when the CAVLC is carried out. To obtain trailing ones T1s and the total coefficient in the first step, an input bit stream is compared to the table to find a position of the table corresponding to the input bit stream. There are total four tables for obtaining the trailing ones T1s and total coefficient in H.264, and the table shown in FIG. 1 is one of them.
When CAVLC is processed with software or general CAVLC hardware, parameters should be extracted through the following example.
It is assumed that a bit stream “00000000011100 . . . ” is inputted to a decoder. If the table of FIG. 1 is selected from the tables for obtaining total coefficients in H.264 standard (a table is selected based on the number of total coefficients of neighboring macro blocks), the table of FIG. 1 has total 62 bit streams. The input bit stream is compared to the bit streams of the table of FIG. 1. When the input bit stream is compared to the bit streams of the table while shifting the input bit stream bit by bit in software processing, a lot of comparisons are required even in hardware processing. A further improved method is to count the number of ‘0’s of the input bit stream and grasp the number of leading zeros (9 in the case of the aforementioned example), to thereby find a bit stream having the same number of leading zeros as the grasped number of leading zeros from the table of FIG. 1. There are plural bit streams found. Remaining bits of the found bit streams other than ‘0’s are accorded to obtain trailing ones T1s and total coefficients at the positions of the accorded result values.
To grasp the number of ‘0’s, ‘0’s are continuously counted until a bit ‘1’ appears while routinely shifting bits. Thus, it takes a long time to grasp the total number of ‘1’s and a lot of calculations and time are required for searching the table for the ‘0’s. As described above, when table search and pattern agreement are performed using a conventional method, a lot of calculations and time are required, and thus improvement in the performance of the H.264 decoder is needed.